package com.crm.job;

import com.crm.service.ICrmProjectService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;

/**
 * @version 1.0
 * @author: CRM_SYSTEM
 * @date: 2022/4/2 0:36
 * @Description:
 */
@Component
@Slf4j
public class ProjectJob {

    @Autowired
    private ICrmProjectService projectService;

    @Scheduled(cron="0/1 * * * * ?")
    public void projectStatusJob(){
        log.info("执行项目状态变更{}", LocalDateTime.now());
        projectService.projectStatusJob();
    }
}
